<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);
response.setHeader("Content-type","application/vnd.ms-excel");
response.setHeader("Content-disposition","inline; filename=REPORTE.xls");
%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<%@ page language="java" import='java.util.ArrayList'%>
<%@ page language="java" import='java.util.List'%>
<%@ page language="java" import='com.dgac.licencias.to.*'%>
<%@ page language="java" import='com.dgac.licencias.util.*'%>
<%@ page language="java" import='java.text.DecimalFormat'%>

<html><head><title>SOLICITAR OTORGAMIENTO DE LICENCIA</title>
<meta http-equiv="Content-Type" content="text/html; charset=unicode"><link 
href="/WebLicencias/css/espacio.css" type=text/css rel=stylesheet>
<link 
href="/WebLicencias/css/calendar-system.css" type=text/css rel=stylesheet>
<script language="javascript" src="/WebLicencias/js/calendar.js"></script>
<script language="javascript" type="text/javascript" src="/WebLicencias/js/js.Farmacia.Function.js"></script>
<script language="javascript" src="/WebLicencias/js/calendar-es.js"></script>
<script language="javascript" src="/WebLicencias/js/utils.js"></script>

<meta content="MSHTML 6.00.6000.16945" name="GENERATOR"></head>
<body>

<div id="idTabla" style="DISPLAY: inline">
<table width="100%" align="center" bgcolor="#fffdd6" border="0">
  <tbody>
      <tr><td><div class="Titulo1B" align="center">TRAMITES DE LICENCIAS</div></td>
  </tr>
  <tr>
    <td>
      <div id="res">
      <br>
      <table class="consultanormal" id="row" cellspacing="0" align="center">
        <thead>
        <tr>
          <th class="sortable" width="5%">&nbsp;&nbsp;</th>
          <th class="sortable" width="5%"><a style="COLOR: white" href="#">No 
            Tramite</a></th>
          <th class="sortable" width="30%"><a style="COLOR: white" 
            href="#">Solicitante</a></th>
          <th class="sortable" width="15%"><a style="COLOR: white" href="#">Tipo 
            Tramite</a></th>
          <th class="sortable" width="5%"><a style="COLOR: white" 
            href="#">Fecha Solicitud</a></th>
          <th class="sortable" width="15%"><a style="COLOR: white" 
            href="#">Estado</a></th>
          <th class="sortable" width="20%"><a style="COLOR: white" 
            href="#">Licencia</a></th></tr></thead>
        <tbody>
         <%
           Page result = (Page) request.getSession().getAttribute("listTramites");
           int hits=0;
           if (result!=null) {
                ArrayList listtra =(ArrayList) result.getResults();
           hits=listtra.size(); 
           for (int i = 0; i < listtra.size(); i++) {
                    SolicitudDeTramiteTO sol = (SolicitudDeTramiteTO) listtra.get(i);
                    String[] clase = {"odd","even"};
         %>
        
        <tr class="<%=(clase[i%2])%>">    
        
          <td>
            <div align="center"></div></td>
          <td class="TextoTabla8">
            <div align="center"><%= sol.getCodSolicitud() %></div></td>
          <td class="TextoTabla8">
            <div align="center"><%= sol.getCodCliente().getNombreCompleto() %></div></td>
          <td class="TextoTabla8">
            <div align="center"><%= sol.getCodTipoTramite().getDescripcion() %></div></td>
          <td class="TextoTabla8">
            <div align="center"><%= sol.getSfecha() %></div></td>
          <td class="TextoTabla8">
            <div align="center"><%= sol.getDesc_estado() %></div></td>
          <td class="TextoTabla8">
            <div align="center"><%= sol.getDesc_licencia() %></div></td></tr>
           <%
          }
        }
           if(hits==0){
            %>
          <tr class="even">
          <td>
            <div align="center">&nbsp; </div></td>
          <td class="TextoTabla8">
            <div align="center">&nbsp;</div></td>
          <td class="TextoTabla8">
            <div align="center">&nbsp;</div></td>
          <td class="TextoTabla8">
            <div align="center">&nbsp;</div></td>
          <td class="TextoTabla8">
            <div align="center">&nbsp;</div></td>
          <td class="TextoTabla8">
            <div align="center">&nbsp;</div></td>
          <td class="TextoTabla8">
            <div align="center">&nbsp;</div></td></tr>
             <%
           }
          %>      
            </tbody></table><br>
                
    
      <br><br></div></td></tr></tbody></table></div>
</form>

</body></html>
